{% extends "base.html" %}

{% block title %}HIT | Hegelian Inquiry Tool - Theory Triangulator{% endblock %}
{% block pagetitle %}Theory Triangulator{% endblock %}

{% block content %}
<IMG SRC="/static/img/bar/{{anti}}theory.png" WIDTH=900 ALT="Progress Bar" style="margin-bottom: 20px">
<div class="triangulation_link">Triangulating <a href="{{ link }}" target="_blank">{{ link }}</a></div>

  <h1>Causal Network</h1>
<script type="text/javascript" src="/static/js/raphael-min.js"></script>
<script type="text/javascript" src="/static/js/dracula_graffle.js"></script>
<script type="text/javascript" src="/static/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/static/js/dracula_graph.js"></script>

<script type="text/javascript">
var redraw, g, renderer;
window.onload = function() {
    var width = 900;
    var height = 900;    
    g = new Graph();
    
    {{alchemy|safe}}
    
    /* layout the graph using the Spring layout implementation */
    var layouter = new Graph.Layout.Spring(g);    
    /* draw the graph using the RaphaelJS draw implementation */
    renderer = new Graph.Renderer.Raphael('canvas', g, width, height);    
    redraw = function() {
        layouter.layout();
        renderer.draw();
    };
    hide = function(id) {
        g.nodes[id].hide();
    };
    show = function(id) {
        g.nodes[id].show();
    };

};
</script>
<div id="canvas"></div>
<button id="redraw" onclick="redraw();">redraw</button>
<br><br>
<h1>Sentiment Analysis</h1><br>
{{sentiment|safe}}

<form action="{{ next }}" method="POST" name="theoryform">
	{% csrf_token %}
	<h1>Extra notes</h1><br />
	<textarea name="notes" rows="20" style="width:800px;"></textarea><br /><br />
	<h1>Reliability</h1><br />
	Give a ranking for reliability:	<input type="text" name="reliability" value="0" />%
	<br /><br />
	
	<span class="buttons">
		<span class="next"><input type="submit" value="Save and continue" /></span>
	</span>
</form>
{% endblock %}
